<?

class suturno
{
	 var $estats;
	 var $cont; 
	 var $last;
	 
	 
	 function suturno($estats)
	 {
		  $this->cont=0;
		  $this->estats=array();
		  $this->last="";
		  
		  if ($estats!=NULL)
		  {
				foreach($estats as $k => $v)
					 $this->estats[]=$estats[$k];
		  }
	 }
	 
	 
	 function get()
	 {
		  $ret=$this->estats[$this->cont];
		  $this->last=$ret;
		  $this->cont=($this->cont+1)%count($this->estats);
		  return ($ret);
	 }
	 
	 function getLast()
	 {
		  return ($this->last);
	 }
}
?>
